Private Sub Form_Resize()
BtnBarInit Me, nBtnAlign ' repaint buttons
End Sub
10. Add the following to the Form_Unload event:
Private Sub Form_Unload(Cancel As Integer)
dbFile.Close ' safe close
End Sub
From this point, save your work and run the project. Please note that most of this code can be copied directly from the StateProv example.
Day 11
Answers to Day 11 Quiz
1. The use of graphics in your Visual Basic database applications offers the following advantages:
· Visual representation of data is easier to understand than tables or lists.
· Graphics offer a different view of the data.
· Graphics give your application a polished appearance.
2. The NumSets property determines how many groups of data will be plotted. The NumPoints property shows how many points will be plotted in the group.
3. No, graphBar3D should be gphBar3D.
4. The Tab character, Chr(9), separates data points in a series. The carriage return/line feed combinationChr(13) + Chr(10)separates datasets for QuickData.
5. Yes, GraphTitle is a valid property.
6. gphBlit sets the graph control to bitmap mode.
gphCopy copies the graph to the Windows Clipboard.
gphDraw draws the graph on-screen.
7. The Variant data type must be used for all optional arguments.
8. The following code moves the data pointer to the end of a dataset and counts the total number of records in the set: